package com.hod.client.frontend;

import com.gwtext.client.data.Store;
import com.gwtext.client.widgets.grid.ColumnModel;
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.GridView;
import com.gwtext.client.widgets.grid.RowSelectionModel;

public abstract class AbstractDataGrid extends GridPanel{
	
     private int width = 700;
     private int height = 500;
     private String title = "Remote Paging Grid";
     
	 protected abstract ColumnModel setcolumnModel();
	 protected abstract Store configureStore();
	 protected abstract GridView setGridView();
	 protected abstract void setPagingToolbar();
     	 
	 public AbstractDataGrid(){
		      
		        setWidth(width);
		        setHeight(height);
		        setTitle(title);
		        setStore(configureStore());
		        setColumnModel(setcolumnModel());
		        setTrackMouseOver(false);
		        setLoadMask(true);
		        setSelectionModel(new RowSelectionModel());
		        setFrame(true);
		        setStripeRows(true);
		        setIconCls("grid-icon");        
		        setView(setGridView());
		        setPagingToolbar();

		        
	 }
}
